<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .div2{
            background-color: black;
            /*
             position: absolute;相对定位视口(浏览器)
              top+bottom把高度拉满
              left+right把宽度拉满
            */
            position: absolute;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
        }
    </style>
</head>
<body>

<div class="div2">aa</div>

</body>

</html>